package com.example.license;

import com.example.license.dao.LicenseRepository;
import com.example.model.License;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class InitData implements CommandLineRunner {
    @Autowired
    private LicenseRepository licenseRepository;

    @Override
    public void run(String... args) throws Exception {
        License license = new License();
        license.setId(1);
        license.setName("cet4");
        license.setOrgId(1);
        licenseRepository.save(license);
    }
}
